import full_vue from "./component/full.vue"
import login_vue from "./component/login/login.vue"
import register_vue from "./component/login/register.vue"
import menuIframe_bue from "./component/menuIframe.vue"
import home_vue from "./component/main/home.vue"
import business_vue from "./component/main/business.vue"
import order_vue from "./component/main/order.vue"
import user_vue from "./component/main/user.vue"
import onlyHead_vue from "./component/onlyHead.vue"
import iframe_vue from "./component/common/iframe.vue"
import goods_vue from "./component/resturant/goods.vue"
import confirmOrder_vue from "./component/order/confirmOrder.vue"


const routes = [
     {path:"/",redirect:"/main"},
    // { path: '/home_tab', component: home_tab },
    /**
     * 全屏页面的路由
     */
    { path:"/view" ,component:full_vue,children:[
        {
            path:"/view",
            redirect:"/view/login"
        },
        {
            path:"/view/login",
            component:login_vue,
            name:"login",
            meta:{
                notlogin:true,
            }
           
        },
        {
            path:"/view/register",
            component:register_vue,
            meta:{
                notlogin:true,
            }
        },
        
        
    ]},
    /**
     * 带头和下部菜单的路由
     */
    { path:"/main",component:menuIframe_bue,children:[
        {
            path:"/main",
            redirect:"/main/home"
        },
        {
            path:"/main/home",
            component:home_vue,
            name:"homePage",
            meta:{
                keepAlive:true,
                keepAlive_two:true
            }
        },
        {
            path:"/main/business",
            component:business_vue,
            name:"businessPage",
            meta:{
                keepAlive:true,
                keepAlive_two:true
            }
          
        },
        {
            path:"/main/order",
            component:order_vue,
            meta:{
                keepAlive:true
            }
        },
        {
            path:"/main/user",
            component:user_vue,
            meta:{
                keepAlive:true
            }
        },
    ]},
    /**
     * 只带头的路由
     */
    {path:"/onlyHead",component:onlyHead_vue,children:[
        {
            path:"/onlyHead/iframe",
            component:iframe_vue
        },
        {
            path:"/onlyHead/goods",
            component:goods_vue,
           
        },
        {
            path:"/onlyHead/confirmOrder",
            component:confirmOrder_vue,
            name:"confirmOrder"
        }
    ]},


  ]


export default routes 